export const getListData=(data)=>{
    return {
        type:"GETLISTS1",
        data
    }
}
export function fetchList(params={page:1,limit:1000000000000000}){
    return dispatch=>{
        var url='http://localhost:3000/users/list';
        return fetch(url, {
            method: 'POST',
            headers: {
              'Content-Type': 'application/json'
            },
            body: JSON.stringify(params)
          })
        .then(res=>{
            // console.log(res)
            return res.json()
        })
        .then((data)=>{
            // console.log(11,data)
            dispatch(getListData(data));
        })
    }
}   
    


